from tkinter import *
a = int(input())
b = int(input())
n = int(input())
xmax = a + 30 * n
ymax = b + 20 * n
if xmax <= 500 and ymax <= 500:
    window = Tk()
    window.geometry('500x500')
    canvas = Canvas(bg = 'white', width = '500', height = '500')
    canvas.pack(anchor = CENTER, expand = 1)
    canvas.create_polygon(a, b, a + 10 * n, b, a + 10 * n, b + 10 * n, \
                        a + 20 * n, b + 10 * n, a + 20 * n, b, a + 30 * n, \
                        b, a + 30 * n, b + 20 * n, a, b + 20 * n, a, b,
                        fill = 'red', outline = 'black')
    window.mainloop()
else:
    print('Размер фигуры превышает максимальный размер поля.')
